

package com.jfinal.core;

import javax.servlet.http.HttpServletRequest;



public  class BaseController extends Controller{	
	/**
	 * Get model from http request.
	 */
	public <T> T getModel(Class<T> modelClass) {
		HttpServletRequest request = getRequest();
		return (T)BaseModelInjector.inject(modelClass, request, false);
	}
	
	/**
	 * Get model from http request.
	 */
	public <T> T getModel(Class<T> modelClass, String modelName) {
		HttpServletRequest request = getRequest();
		return (T)BaseModelInjector.inject(modelClass, modelName, request, false);
	}
	
	
}


